Enterprise Objects Framework Release 1.1 Copyright ã1995 by NeXT Computer, Inc.  All Rights Reserved.

EOJoin

Inherits From:	NSObject

Declared In:	eoaccess/EOJoin.h

Class Description

An EOJoin describes one source-destination attribute pair for an EORelationship and holds the join semantic and the join operator for the relationship. There are four types of join semantic, as specified by the EOJoinSemantic type: EOInnerJoin, EOFullOuterJoin, EOLeftOuterJoin, and EORightOuterJoin. An inner join produces results only for destinations of the join relationship that have non-NULL values. A full outer join produces results for all source records, regardless of the values of the relationships. A left outer join preserves rows in the left (source) table, keeping them even if there's no corresponding row in the right table, while a right outer join preserves rows in the right (destination) table.

Note:  Not all join semantics are supported by all database servers.

A join's comparison operator is encoded by the type EOJoinOperator, which has the following possible values: EOJoinEqualTo, EOJoinNotEqualTo, EOJoinGreaterThan, EOJoinGreaterThanOrEqualTo, EOJoinLessThan, and EOJoinLessThanOrEqualTo. Records with attributes matching according to the operator are included in the join; those not matching are excluded.

See the EORelationship class specification for more information and for examples.

Instance Variables

None declared in this class.

Method Types

Initializing new instances	- initWithSourceAttribute:destinationAttribute:
joinOperator:joinSemantic:

Setting join specifiers	- setDestinationAttribute:
- destinationAttribute
- setSourceAttribute:
- sourceAttribute
- setJoinOperator:
- joinOperator
- setJoinSemantic:
- joinSemantic

Instance Methods

destinationAttribute

- (EOAttribute *)destinationAttribute

Returns the destination (ªrightº) attribute used by the join.

initWithSourceAttribute:destinationAttribute:joinOperator:
joinSemantic:

- initWithSourceAttribute:(EOAttribute *)sourceAttribute
destinationAttribute:(EOAttribute *)destinationAttribute
joinOperator:(EOJoinOperator)operator
joinSemantic:(EOJoinSemantic)semantic

Initializes a newly allocated EOJoin with the given information. This is the designated initializer for the EOJoin class. Returns self.

See the EORelationship class specification for an example of creating a relationship using EOJoins.

joinOperator

- (EOJoinOperator)joinOperator

Returns the operator used by the join. See the class description for an overview of the possible join operators.

joinSemantic

- (EOJoinSemantic)joinSemantic

Returns the semantic of the join. See the class description for an overview of the possible join semantics.

setDestinationAttribute:

- (void)setDestinationAttribute:(EOAttribute *)anAttribute

Sets the destination (ªrightº) attribute used by the join to anAttribute.

setJoinOperator:

- (void)setJoinOperator:(EOJoinOperator)anOperator

Sets the operator used by the join to anOperator. See the class description for an overview of the possible join operators.

setJoinSemantic:

- (void)setJoinSemantic:(EOJoinSemantic)aSemantic

Sets the semantic of the join to aSemantic. See the class description for an overview of the possible join semantics.

setSourceAttribute:

- (void)setSourceAttribute:(EOAttribute *)attribute

Sets the source (ªleftº) attribute used by the join to anAttribute.

sourceAttribute

- (EOAttribute *)sourceAttribute

Returns the source (ªleftº) attribute used by the join.